home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Demos / Bowers Development / AppMaker 2.1.sit / AppMaker 2.1 / Examples / Windows MFC / MFC generated / CDemo1DlgView.cp < prev    next >
Encoding:
Text File  |  1996-01-01  |  1.9 KB  |  111 lines

  1. // CDemo1DlgView.cp -- view class
  2. // Created 01/01/95 12:01 PM by AppMaker
  3.  
  4.  
  5. #include "stdafx.h"
  6. #include "Demo1Dlg.h"
  7. #include "CDemo1DlgDoc.h"
  8. #include "CDemo1DlgView.h"
  9. #include "CTestDialog1.h"
  10. #include "CTestDialog2.h"
  11.  
  12. #ifdef _DEBUG
  13. #undef THIS_FILE
  14. static char BASED_CODE THIS_FILE[] = __FILE__;
  15. #endif
  16.  
  17. //
  18. // class CDemo1DlgView
  19. //
  20.  
  21. IMPLEMENT_DYNCREATE(CDemo1DlgView, CView)
  22.  
  23. BEGIN_MESSAGE_MAP(CDemo1DlgView, CView)
  24.     //{{AFX_MSG_MAP(CDemo1DlgView)
  25.         ON_COMMAND(IDM_TestDialog1,OnTestDialog1)
  26.         ON_COMMAND(IDM_TestDialog2,OnTestDialog2)
  27.     //}}AFX_MSG_MAP
  28.  
  29.     // Use inherited for File/Print and File/Print Preview
  30.     ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  31.     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  32. END_MESSAGE_MAP()
  33.  
  34. //
  35. // CDemo1DlgView constructor
  36. //
  37.  
  38. CDemo1DlgView::CDemo1DlgView()
  39. {
  40. }
  41.  
  42. //
  43. // CDemo1DlgView destructor
  44. //
  45.  
  46. CDemo1DlgView::~CDemo1DlgView()
  47. {
  48. }
  49.  
  50. void CDemo1DlgView::OnDraw(CDC *pDC)
  51. {
  52.     CDemo1DlgDoc *pDoc = GetDocument();
  53. }
  54.  
  55. BOOL CDemo1DlgView::OnPreparePrinting(CPrintInfo *pInfo)
  56. {
  57.     return DoPreparePrinting(pInfo);
  58. }
  59.  
  60. void CDemo1DlgView::OnBeginPrinting(CDC */*pDC*/, CPrintInfo */*pInfo*/)
  61. {
  62. }
  63.  
  64. void CDemo1DlgView::OnEndPrinting(CDC */*pDC*/, CPrintInfo */*pInfo*/)
  65. {
  66. }
  67.  
  68. //
  69. // CDemo1DlgView debug diagnostics
  70. //
  71.  
  72. #ifdef _DEBUG
  73. void CDemo1DlgView::AssertValid() const
  74. {
  75.     CView::AssertValid();
  76. }
  77.  
  78. void CDemo1DlgView::Dump(CDumpContext& dc) const
  79. {
  80.     CView::Dump(dc);
  81. }
  82.  
  83. CDemo1DlgDoc *CDemo1DlgView::GetDocument() // non-debug version is inline
  84. {
  85.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDemo1DlgDoc)));
  86.     return (CDemo1DlgDoc *) m_pDocument;
  87. }
  88.  
  89. #endif 
  90.  
  91. //
  92. // CDemo1DlgView message handlers
  93. //
  94.  
  95. //----------
  96. void
  97. CDemo1DlgView::OnTestDialog1 ()
  98. {
  99. CTestDialog1  theDlg;
  100. theDlg.DoModal();  // just showing, don't care about return
  101. }
  102.  
  103. //----------
  104. void
  105. CDemo1DlgView::OnTestDialog2 ()
  106. {
  107. CTestDialog2  theDlg;
  108. theDlg.DoModal();  // just showing, don't care about return
  109. }
  110.  
  111.